package com.toonyoo.eurekaserver;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class CheckClientOnlineThread extends Thread{

    @PostConstruct
    @Override
    public synchronized void start() {
        super.start();
    }

    @Override
    public void run() {
        System.out.println("检查在线线程开启...");
        for (int i=10;i>0;i--){
            try {
                Thread.sleep(1000);
                System.out.println("正在检查"+i+"...");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
